<?php
require ('include/connect.php');
require ('include/db_sql.php');
require ('include/functions.php');
require LoadLang('f.php');
if (isset($_GET['action'])) {
	$action = $_GET['action'];
}
if (empty($action)) {
    $action = $_POST['action'];
}
$lur = islogin();
$loginin = $lur['username'];
$rnd = $lur['rnd'];
$link = db_connect();
$dblink = new mysqlquery();
if ($action == "DoEbak") // 初使化备份表
{
    DoEbak($_POST);
} elseif ($action == "BakExe") // 备份表(按文件)
{
    $t = $_GET['t'];
    $s = $_GET['s'];
    $p = $_GET['p'];
    @$mypath = $_GET['mypath'];
    @$alltotal = $_GET['alltotal'];
    @$thenof = $_GET['thenof'];
    @$fnum = $_GET['fnum'];
    @$stime = $_GET['stime'];
    BakExe($t, $s, $p, $mypath, $alltotal, $thenof, $fnum, $stime);
} elseif ($action == "BakExeT") // 备份表(按记录)
{
    $t = $_GET['t'];
    $s = $_GET['s'];
    $p = $_GET['p'];
    $mypath = $_GET['mypath'];
    $alltotal = $_GET['alltotal'];
    $thenof = $_GET['thenof'];
    $fnum = $_GET['fnum'];
    $auf = $_GET['auf'];
    $aufval = $_GET['aufval'];
    $stime = $_GET['stime'];
    BakExeT($t, $s, $p, $mypath, $alltotal, $thenof, $fnum, $auf, $aufval, $stime);
} elseif ($action == "ReData") // 恢复数据
{
    $add = $_POST['add'];
    $mypath = $_POST['mypath'];
    ReData($add, $mypath);
} else {
    printerror("ErrorUrl", "history.go(-1)");
}